import request from "@/utils/request";

export function page(data) {
  return request({
    url: "/v1/sys-user/page",
    method: "get",
    params: data
  });
}

export function save(data) {
  return request({
    url: "/v1/sys-user/save",
    method: "post",
    data: data
  });
}

export function update(data) {
  return request({
    url: "/v1/sys-user/update",
    method: "post",
    data: data
  });
}

export function deleteId(id) {
  return request({
    url: "/v1/sys-user/delete/" + id,
    method: "get"
  });
}

export function check(id) {
  return request({
    url: "/v1/sys-user/get/" + id,
    method: "get"
  });
}
// 重置密码
export function resetPassWord(id) {
  return request({
    url: "/v1/sys-user/resetPassword/" + id,
    method: "PUT"
  });
}

// 密码修改
export function changePassword(data) {
  return request({
    url: "/v1/sys-user/changePassword",
    method: "PUT",
    params: data
  });
}

// 密码修改
export function queryUserRole(data) {
  return request({
    url: "/v1/sys-user/queryUserRole",
    method: "get",
    params: data
  });
}
